package com.boot.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

//名称随便，url假如是这个地址
@FeignClient(value = "weather-client",url = "http://localhost:8080")
public interface weatherFeignClient {
    @PostMapping("getInfo")
    //假如这个接口需要传入authKey认证，参数需要token和userId
    String getInfo(@RequestHeader("Authorization") String authKey,
                 @RequestParam("token") String token,
                 @RequestParam("userId") String userId);
}
